<%@ page 
language="java" 
import="java.util.*" 
import="com.csd.helper.IConstant"
import="com.csd.vo.UserVO"
import="com.csd.pojo.Teacher"
pageEncoding="UTF-8"
%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
HttpSession s = request.getSession();
UserVO uvo =  (UserVO)s.getAttribute(IConstant.userVO);
if(uvo==null || !uvo.getType().equals(IConstant.teacherRole))
{
	response.sendRedirect(path);
}

Teacher teacher = (Teacher)request.getAttribute("teacher");

if(teacher==null)
{
	response.sendRedirect(path+"/teacher/welcome.jsp");
}
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>个人信息修改</title>
<link href="<%=path %>/teacher/css/teacher_right.css" rel="stylesheet" type="text/css" />
 <script type="text/javascript" src="js/check.js"></script>
</head>

<body>
    <div class="main">
        <h1>个人信息</h1>
        <hr />
        <form action="<%=path %>/teacherUpdate.action" method="post" accept-charset="UTF-8" onsubmit="javascript:return checkForm(this);">
        <table align="center">

            <tr>
                <td><span class="form_strong">姓名：</span></td>
                <td><%=teacher.getName() %></td>
            </tr>
            <tr>
                <td><span class="form_strong">电子邮箱：</span></td>
                <td><input name="email" type="text" value="<%=teacher.getEmail()==null?"":teacher.getEmail()%>" maxlength="50" onblur="javascript:checkEmail(this);" /></td>
            </tr>
            <tr>
                <td><span class="form_strong">电话：</span></td>
                <td><input  name="phone" type="text" value="<%=teacher.getPhone()==null?"":teacher.getPhone() %>" maxlength="20" onblur="javascript:checkTelephone(this);" /></td>
            </tr>
            <tr>
                <td><span class="form_strong">个人网站：</span>.</td>
                <td><input name="website" type="text" value="<%=teacher.getWebsite()==null?"":teacher.getWebsite()%>" maxlength="50" onblur="javascript:checkWebSite(this);" /></td>
            </tr>
            <tr>
                <td colspan="2"><span class="form_strong">个人简介：</span></td>
            </tr>
            <tr>
                <td colspan="2" >
                    <textarea cols="70" rows="10" name="introduction" onblur="javascript:checkNotNull(this);"><%=teacher.getIntroduction()==null?"":teacher.getIntroduction()%></textarea>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                   <input type="submit" value="  修改  "  />
                </td>
            </tr>
        </table>
        </form>
    </div>
</body>
</html>
